function p = predict(theta, X)
    %   Number of the data
    m = size(X, 1);
    %   Probability of the data
    p = zeros(m, 1);
    %   Result of the data
    X_result = sigmoid(X * theta);
    %   Threshold is 0.5
    %   Find the positive position of the data
    positivePosition = find(X_result >= 0.5);
    %   Find the negative position of the data
    negativePosition = find(X_result < 0.5);
    %   Set positive prediction
    p(positivePosition, 1) = 1;
    %   Set negative prediction
    p(negativePosition, 1) = 0;
end
